package org.microsites.msg;

import java.util.List;

import org.eclipse.jetty.websocket.WebSocket.Outbound;
import org.microsites.domain.model.User;
import org.microsites.util.UserContext;

public class MessageBroker implements PeerListener {
    
    private UserContext userCtx;

    public Peer createPeer() {
        Peer p = new Peer(this.userCtx.getUser());
        p.addListener(this);
        return p;
    }

    @Override
    public void onConnect(User u, Outbound o) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onDisconnect(User u) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onMessage(User u, List<String> l) {
        // TODO Auto-generated method stub

    }

    public UserContext getUserCtx() {
        return userCtx;
    }

    public void setUserCtx(UserContext userCtx) {
        this.userCtx = userCtx;
    }
}
